$(function () {
    $('.box').height($(window).height());
    
    $('.close').on('click',function () {
        $(this).closest('.box').fadeOut(300);
    })

    $('.toPage').on('click',function () {
        var page = $(this).data('page');
        
        $.ajax({
            url : $config.kcishost+'/m/Activity/toApply',
            type : 'get',
            data : {
                id: $config.GetQueryString('eid'),
                yxq_wx_token: $.cookie('yxq_wx_token'),
            },
            success : function (json) {
                // var json = JSON.parse(json);
                if(json.errcode == 0){
                    console.log('ok');
                    window.location.href = 'event_sign.html?eid='+$config.GetQueryString('eid');
                    // $('.'+page).fadeIn(300);
                }else{
                    swal(json.errmsg);
                }
            }
        })
    })
    
    //显示说明内容
    $('.explain .say').on('click',function () {
        $('.box-explain').fadeIn(300);
    });
})
